﻿CREATE TABLE [dbo].[Video_Artist]
(
	[VideoID]     	uniqueidentifier NOT NULL,
	[ArtistID]		uniqueidentifier NOT NULL,
	[ItemOrder]		tinyint NOT NULL DEFAULT ((0)),
    CONSTRAINT [PK_Video_Artist] PRIMARY KEY([VideoID],[ArtistID]),
    CONSTRAINT [UK_Video_Artist] UNIQUE([VideoID],[ItemOrder]),
    CONSTRAINT [FK_Video_Artist_VideoID] FOREIGN KEY([VideoID]) REFERENCES [dbo].[Video]([VideoID]),
    CONSTRAINT [FK_Video_Artist_ArtistID] FOREIGN KEY([ArtistID]) REFERENCES [dbo].[Artist]([ArtistID])
)